//
// Created by Administrator on 2021/5/24.
//

#include "maxHblt.h"
#include <iostream>
#include <vector>

using namespace std;

int main() {
    auto priorityTree = new maxHblt<int>;
    int a[] = {1, 2, 3, 4, 5, 7, 8, 9};
    priorityTree->initializer(a, 8);
    cout << priorityTree->top() << endl;
    vector<int> v{2, 4, 5, 6};
    priorityTree->initializer(v,v.size());
    cout << priorityTree->top() << endl;
    priorityTree->push(1);
    cout << priorityTree->top() << endl;
    priorityTree->push(5);
    cout << priorityTree->top() << endl;
    priorityTree->push(4);
    cout << priorityTree->top() << endl;
    priorityTree->push(2);
    cout << priorityTree->top() << endl;
    priorityTree->pop();
    cout << priorityTree->top() << endl;
    priorityTree->pop();
    cout << priorityTree->top() << endl;
    delete priorityTree;
    return 0;
}
